<?php


/*
 * FICHERO CARGA CLASES FUNCIONAMIENTO MVC
 */

	ini_set('error_reporting', E_ALL|E_STRICT);
	ini_set('display_errors', 1);
	DEFINE('SERVER','http://192.168.100.227/test/');
	DEFINE('ROOT',__DIR__.'/');

	ini_set('memory_limit', '512M');
	require 'vendor/autoload.php';

/*
 *---------------------------------------------------------------
 * ENTORNO TRABAJO
 *---------------------------------------------------------------
 *
 * This can be set to anything, but default usage is:
 *
 *     development
 *     production
 *
 * NOTE: If you change these, also change the error_reporting() code below
 *
 */
	define('ENVIRONMENT', 'development');
/*
 *---------------------------------------------------------------
 * ERROR REPORTING
 *---------------------------------------------------------------
 *
 * Different environments will require different levels of error reporting.
 * By default development will show errors but production will hide them.
 */

	if (defined('ENVIRONMENT')){
	
		switch (ENVIRONMENT){
			case 'development':
				error_reporting(E_ALL);
			break;
	
			case 'production':
				error_reporting(0);
			break;
	
			default:
				exit('The application environment is not set correctly.');
		}
	
	}

	
	
	//initiate config
	new \config\App();
	//añadimos namespace Router
	use \fcf\router as Router;
	
	//Iniciamos enrutador
	Router::dispatch();

?>